﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using FlickrSample.SL.Infrastructure.Flickr.Entities;
using XamlingCore.Infrastructure.View;

namespace FlickrSample.View.Photo
{
    public class PhotoDetailViewModel : XContentViewModelBase
    {
        private FlickrPhoto photo;

        private FlickrPhotoInstance instance;

        public override void OnInitialise()
        {
            Title = Photo.Title;
            if (photo.PhotoInstances.Count > 5)
            {
                instance = photo.PhotoInstances[5];
            }
        }

        public FlickrPhoto Photo
        {
            get { return photo; }
            set
            {
                photo = value;
                OnPropertyChanged("Photo");
            }
        }

        public FlickrPhotoInstance Instance
        {
            get { return instance; }
            set
            {
                instance = value;
                OnPropertyChanged("Instance");
            }
        }
    }
}
